<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <input v-model="msg" type="text" />
    {{ msg.split('').reverse().join("") }}
    {{ reverseMsg }}
    {{ reverseMsg2() }}
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: "#app",
      data:{
        msg: 'hello vue'
      },
      methods:{
        reverseMsg2(){
          return this.msg.split('').reverse().join("")
        }
      },
      computed:{
        reverseMsg(){
          return this.msg.split('').reverse().join("")
        }
      }
    })
  </script>
</body>
</html>
